Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Rendered • View rawDownload


docs/agents/skills/contribution-registries/SKILL.md f62b203bebdec1de31991f198904a10b7cd73e62 (f62b203b) Text, 1.93 KB

Skill: contribution-registries

Wire nav, tools, commands, settings search, and WebSocket events through registries instead of hardcoding shell or App.vue dispatch.

When to use

• Adding a discoverable page, tool, command palette entry, or settings section
• Adding a new WebSocket event type handled by the UI
• Plugin contribution points or slot UI

Registries

┌───────────────────────────────────────┬────────────────────────────┐
│ Registry │ Role │
├───────────────────────────────────────┼────────────────────────────┤
│ T383838navRegistry.js │ Primary sidebar / nav │
│ T383838toolsRegistry.js │ Tools area entries │
│ T383838commandRegistry.js │ Command palette │
│ T383838settingsSectionRegistry.js │ Settings search / sections │
│ T383838wsEventRegistry.js + T383838wsEventBridge.js │ Typed WS handlers │
└───────────────────────────────────────┴────────────────────────────┘

Core boot registers once via T383838registerCoreContributions.js and T383838core*Entries.js siblings.

Hard rules

• New top-level pages still need a route in T383838main.js (see T383838page-toast-tests). Registries cover discoverability and dispatch, not routing alone.
• Prefer T383838onWsEvent / registry handlers over growing ad-hoc T383838switch (json.type) blocks in T383838App.vue.
• Settings search keywords belong in the settings section registry, not scattered only inside T383838SettingsPage.vue.
• Plugin UI uses the existing slot vocabulary (T383838PluginSlotNode / related renderers). Do not invent a parallel slot system.

Key files

• T383838meshchatx/src/frontend/js/registries/
• T383838meshchatx/src/frontend/js/registries/registerCoreContributions.js
• T383838meshchatx/src/frontend/components/plugins/PluginSlotNode.vue
• T383838meshchatx/src/frontend/main.js (routes)

Verification

T282828
pnpm Tffa657exec vitest run tests/frontend/ -t registry


If no dedicated registry tests match, run the page or App tests that cover the new entry, plus eslint on touched files.


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────